import mountNativeElement from './mountNativeElement';
import isFunction from './isFunction';
import mountComponent from './mountComponent';
export default function mountElement(virtualDOM, container, oldDOM) {
  if (isFunction(virtualDOM)) {
    // console.log('组件', virtualDOM)
    // Components
    // oldDOM，用于组件对比时不是同一个组件时删除旧的 DOM
    mountComponent(virtualDOM, container, oldDOM);
  } else {
    // console.log('NativeElement', virtualDOM)
    // NativeElement
    // oldDOM，用于组件对比时不是同一个组件时删除旧的 DOM
    mountNativeElement(virtualDOM, container, oldDOM);
  }
}
